package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Getter@Setter
public class Question extends BaseDomain{
    public static final int STATE_REJECT = -1;//拒绝
    public static final int STATE_NORMAL = 0;//草稿
    public static final int STATE_WAIT = 1;//待发布
    public static final int STATE_RELEASE = 2;//已发布

    private String title;

    private String content;
    @JsonFormat(pattern = "y-M-d",timezone = "GMT+8")
    @DateTimeFormat(pattern = "y-M-d")
    private Date createTime;

    private User user;

    private int state;

    private Integer answerCount;//答案数量

}